$(function () {
    findById();
});

function findById() {
    let id = sessionStorage.getItem("teamId");
    let result = myAjax("/api/stu/tur/getStudentByTeamId", {id: id}, "get");
    if (result.code !==200) {
        alert(result.message);
        x_admin_close();
    }
    setData(result.data);
}

function setData(data) {
    let html = "";
    for (let i = 0; i < data.length; i++) {
        html += "<div>\n" +
            "           <div><img src='" + URI + IMG + data[i].icon + "' /></div>\n" +
            "           <div>" + data[i].nickName + "</div>\n" +
            "           <div>" + data[i].roleName + "</div>\n" +
            "       </div>";
    }
    $("#tbody").html(html);
}
